package service

import (
	"context"
	"errors"
	"{{.ProjectName}}/internal/validator"

	"gitee.com/wu-jin-feng/fgin"
)

type GreeterService struct {
	F *fgin.Fgin
}

func NewGreeterService(f *fgin.Fgin) *GreeterService {
	return &GreeterService{F: f}
}

func (s *GreeterService) GetScheme(ctx context.Context, input validator.GetSchemeInput) (validator.GetSchemeOut, error) {
	out := validator.GetSchemeOut{}
	if input.Info == "" {
		return out, errors.New("info 不能为空")
	}
	out = validator.GetSchemeOut{
		Data: input.Path + ",gogogo",
		Info: input.Info + ",gogogo",
		Name: input.Name + ",gogogo",
	}
	return out, nil
}
